<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title>集品</title>

    <link href="__PUBLIC__/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css"/>

    <link href="__PUBLIC__/basic/css/demo.css" rel="stylesheet" type="text/css"/>

    <link href="__PUBLIC__/css/hmstyle.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/skin.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="__PUBLIC__/css/index.css">

    <!--必要样式-->
    <link rel="stylesheet" href="__PUBLIC__/new_css/index_css.css">
</head>
<include file="Public:wechat_share" />
<body>

<!--顶部搜索-->
<div class="am-g am-text-center" style="background-color: #FFAD01">
    <div class="am-u-sm-2 " style="margin-top: 1%">
        <img src="__PUBLIC__/new_images/logo.png" width="50" alt="" height="50">
    </div>
    <div class="am-u-sm-8 ">
        <form >
        <input type="search" class="search" id="search" placeholder="搜索商品，获得更多好物">
        </form>
    </div>
    <div class="am-u-sm-2" style="padding-top: 5px;">
        <a href="{:U('Index/selectCity')}">
            <img src="__PUBLIC__/new_images/map.png" class="am-margin-top-xs" width="20" alt=""><br>
            <span style="color: #FFFFFF;font-size: 12px;">{$city}</span>
        </a>
    </div>
</div>

<!--轮播 -->
<div class="banner">
    <div class="am-slider am-slider-default scoll" data-am-flexslider id="demo-slider-0">
        <ul class="am-slides">
            <volist name="adList" id="ad">
                <li class="banner{$i+1}"><a href="{$ad.ad_link}"><img src="{$ad.ad_code}" height="170"/></a></li>
            </volist>
        </ul>
    </div>
</div>


<div class="shopNav">
    <div class="slideall">
        <!--小导航 -->
        <div class="am-g am-g-fixed smallnav">


<!--<div class="am-g" style="margin-left: 0;margin-right: 0;">
            <div class="am-u-sm-3 margin-bottom-10">
                <a href="__APP__/Home/Index">
                    <img src="__PUBLIC__/new_images/class2.png" width="40" width="40"/>
                    <div class="title">清新福建</div>
                </a>
            </div>

            <div class="am-u-sm-3 margin-bottom-10">
                <a href="#" onclick="modal()">
                    <img src="__PUBLIC__/new_images/class3.png" width="40" width="40"/>
                    <div class="title">诗画浙江</div>
                </a>
            </div>
            <div class="am-u-sm-3 margin-bottom-10">
                <a href="#" onclick="modal()">
                    <img src="__PUBLIC__/new_images/class8.png" width="40" height="40"/>
                    <div class="title">美好江苏</div>
                </a>
            </div>
            <div class="am-u-sm-3 margin-bottom-10">
                <a href="#" onclick="modal()">
                    <img src="__PUBLIC__/new_images/class4.png" width="40" width="40"/>
                    <div class="title">独好江西</div>
                </a>
            </div>
</div>
            <div class="am-g" style="margin-left: 0;margin-right: 0;">
            <div class="am-u-sm-3 margin-bottom-10">
                <a href="#" onclick="modal()">
                    <img src="__PUBLIC__/new_images/class1.png" width="40" width="40"/>
                    <div class="title">活力广东</div>
                </a>
            </div>
            <div class="am-u-sm-3 margin-bottom-10">
                <a href="#" onclick="modal()">
                    <img src="__PUBLIC__/new_images/class7.png" width="40" width="40"/>
                    <div class="title">灵秀湖北</div>
                </a>
            </div>
            <div class="am-u-sm-3 margin-bottom-10">
                <a href="#" onclick="modal()">
                    <img src="__PUBLIC__/new_images/class5.png" width="40" width="40"/>
                    <div class="title">七彩云南</div>
                </a>
            </div>
            <div class="am-u-sm-3 margin-bottom-10">
                <a href="#" onclick="modal()">
                    <img src="__PUBLIC__/new_images/class6.png" width="40" width="40"/>
                    <div class="title">魅力湖南</div>
                </a>
            </div>
            </div>
        </div>-->
    </div>
</div>


<!--商城头条 -->
<div class="am-g">
    <div class="marqueen">
        <div class="bg-white">
            <span class="marqueen-title am-u-sm-3"><img src="__PUBLIC__/new_images/new.png" height="36" alt=""></span>
            <div class="am-u-sm-9">
                <ul>
                    <volist name="noticeList" id="notice">
                        <li><a href="#" style="color: #999;"><marquee style="padding: 11px;" direction="left" behavior="scroll" height="36" scrollamount="5" scrolldelay="100"
                        >[{$notice.category_name}] {$notice.title}{:strip_tags(html_entity_decode($notice['content']))}</marquee></a></li>
                    </volist>
                </ul>
            </div>
        </div>
    </div>
</div>
<!--特殊产品-->
<div class="am-g">
    <div class="am-u-sm-12">
        <div class="order">
            <span style="white-space:pre"></span><span class="line"></span>
            <span style="white-space:pre"></span><span class="txt" style="font-size: 16px;">新用户礼品</span>
            <span style="white-space:pre"></span><span class="line"></span>
        </div>
    </div>
    <div class="am-u-sm-12">
        <a href="{:U('Goods/takeSpecGoods', array('id'=> $specGoods['id']))}">
            <img src="{$specGoods.image1}" alt="" width="100%">
        </a>
    </div>
</div>

<!--热门产品-->
<div class="am-g" style="background-color: #f6f6f6;">
    <div class="am-u-sm-12" style="background-color: #fff;">
        <div class="order">
            <span style="white-space:pre"></span><span class="line2"></span>
            <span style="white-space:pre"></span><span class="txt" style="font-size: 16px;">热门产品</span>
            <span style="white-space:pre"></span><span class="line2"></span>
        </div>
    </div>
    <volist name="hotGoodsList" id="goods">
        <div class="am-u-sm-6 active-list">
            <a href="__APP__/Home/Goods/introduction/?goods_id={$goods.goods_id}">
            <div class="active-box" style="border:none;background-color: #fff;">
                <img src="{$goods.original_img}" alt="" class="productimg">
                <div width="100%" style="">
                <span class="active-content">{$goods.goods_remark}</span>
                <eq name="user.user_type" value="0">
                    <span  class="active-money" style="color: red;">￥{$goods.shop_price}</span>
                    <else/>
                <span class="active-money" style="color: red;font-size: 12px;">
                    <span >代理价:￥{$goods.agent_price}</span><span style="color:#666;margin-left: 20px;">零售价:{$goods.shop_price}</span>
                </span>

                    </eq>
                </div>
                <!--<a href="#" class="active-search">看相似</a>-->
            </div>
            </a>
        </div>
    </volist>
</div>


<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">提示</div>
        <div class="am-modal-bd" id="hit_content">

        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" id="ok">确定</span>
        </div>
    </div>
</div>

<!--底部导航-->
<include file="Public:bottom_navbar" />



<div id="div_fastnav" class="fast-nav-wrapper">
    <ul class="fast-nav">
        <li id="li_menu" isshow="0" onclick="showHome()" align="center" ><img src="__PUBLIC__/new_images/more.png" ></li>
        <li id="li_top" align="center" style="display: none;" onclick="backtop()"><img src="__PUBLIC__/new_images/top.png" ></li>
    </ul>
    <div class="sub-nav ios"  style="display: none">
        <a href="#"><img src="__PUBLIC__/new_images/logo_right.png" >集品</a>
        <a href="__APP__/Home/Category"><img src="__PUBLIC__/new_images/sort_right.png" >分类</a>
        <a href="__APP__/Home/ShopCart"><img src="__PUBLIC__/new_images/shopcar_right.png" >购物车</a>
        <a href="__APP__/Home/Me"><img src="__PUBLIC__/new_images/user_right.png" >我的集品</a></div>
</div>
<script src="__PUBLIC__/AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
<script src="__PUBLIC__/AmazeUI-2.4.2/assets/js/amazeui.min.js"></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script type="text/javascript">
    //搜索框获得焦点事件
//    $("#search").focus(function () {
//        window.location.href = '__ROOT__/Home/Goods/search';
//    });
    $('#search').bind('keyup', function(event) {
        if (event.keyCode == "13") {
            var search = $('#search').val();
            if(!search || search==''){
                return;
            }
            window.location.href = '__APP__/Home/Goods/search?search='+search;
        }

    });

    $(function(){
        var flag = {$flag};
//        alert(flag);
        if(flag == 1){

//            layer.open({
//                content: '该省份无商品'
//                ,skin: 'msg'
//                ,time: 2000 //2秒后自动关闭
//            });
            layer.msg('该省份无商品');
            window.location.href = '__URL__/index?city=厦门市';

        }


    });

    $('#search').bind('keyup', function(event) {
        if (event.keyCode == "13") {
            var search = $('#search').val();
            if(!search || search==''){
                return;
            }
            window.location.href = '__APP__/Home/Goods/search?search='+search;
        }

    });
    //悬浮框
    function showHome() {
        $("#show").fadeToggle(1000);
    }

    <!--轮播-->
    $(function () {
        $('.am-slider').flexslider();
    });
    $(document).ready(function () {
        $("li").hover(function () {
            $(".category-content .category-list li.first .menu-in").css("display", "none");
            $(".category-content .category-list li.first").removeClass("hover");
            $(this).addClass("hover");
            $(this).children("div.menu-in").css("display", "block")
        }, function () {
            $(this).removeClass("hover")
            $(this).children("div.menu-in").css("display", "none")
        });

        //滚动监听时间
        $(window).scroll(function(event) {

            var winPos = $(window).scrollTop();
            //滚动高度
            if (winPos > 400) {
                $("#li_top").show();

            } else {
                $("#li_top").hide();

            }

        });
    })

    //商城头条滚动
    if ($(window).width() < 640) {
        function autoScroll(obj) {
            $(obj).find("ul").animate({
                marginTop: "-39px"
            }, 500, function () {
                $(this).css({
                    marginTop: "0px"
                }).find("li:first").appendTo(this);
            })
        }

        $(function () {
            setInterval('autoScroll(".demo")', 3000);
        })
    }


    //悬浮框
    function showHome() {
        $(".ios").fadeToggle(500);
    }
    //向上滚动
    function backtop() { //点击图片时触发点击事件

//        console.info('dsadsa');
        timer = setInterval(function() { //设置一个计时器
            var ct = document.documentElement.scrollTop || document.body.scrollTop; //获取距离顶部的距离
            ct -= 10;
            if (ct > 0) { //如果与顶部的距离大于零
                window.scrollTo(0, ct); //向上移动10px
            } else { //如果距离小于等于零
                window.scrollTo(0, 0); //移动到顶部
                clearInterval(timer); //清除计时器
            }
        }, 10);
    }


    function modal(){


        layer.msg('敬请期待', {type:1});
    }
</script>
</body>
</html>